A. reference_point indicates the current position of the file object
B. reference_point indicates the starting position of the file object
C. reference_point indicates the ending position of the file object
D. None of the above
Correct Answer is :
B. reference_point indicates the starting position of the file object
Explanation
In the seek() method of a file object in Python, the offset parameter is the number of bytes to move the file pointer, and the optional reference_point parameter indicates the reference point or the position from where the offset should be measured. The reference_point parameter is optional, and if not provided, it defaults to the beginning of the file (offsets are measured from the beginning).
The reference_point parameter can take one of the following values:
- 0 (default): The offset is measured from the beginning of the file.
- 1: The offset is measured from the current file position.
- 2: The offset is measured from the end of the file.